package com.easychat.entity.constants;

import com.easychat.entity.enums.UserContactTypeEnum;

/**
 * @Author: yudaxian
 * @Description: TODO
 * @DateTime: 2024/8/6 19:32
 **/
public class Constants {

    public static final String REDIS_KEY_CHECK_CODE = "easychat:checkcode:";

    public static final String REDIS_KEY_WS_USER_HEART_BEAT = "easychat:ws:user:heartbeat:";

    public static final String REDIS_KEY_WS_TOKEN = "easychat:ws:token:";

    public static final String REDIS_KEY_WS_TOKEN_USERID = "easychat:ws:token:usreId:";

    public static final String REDIS_KEY_SYS_SETTING = "easychat:syssetting:";

    public static final Integer REDIS_EXPIRE_TIME_1MIN = 60;

    public static final Integer REDIS_KEY_EXPIRE_HEART_BEAT = 6;

    public static final Integer REDIS_KEY_EXPIRE_DAY = REDIS_EXPIRE_TIME_1MIN * 60 * 24;

    public static final Integer USER_ID_LENGTH = 11;

    public static final Integer RANDOM_CODE_LENGTH = 20;

    public static final String ROBOT_UID = "00000";

    public static final String BOOT_UID = UserContactTypeEnum.USER.getPrefix() + ROBOT_UID;

    public static final String FILE_FOLDER_FILE = "/file/";

    public static final String FILE_FOLDER_AVATAR_NAME = "avatar/";

    public static final String IMAGE_SUFFIX = ".png";

    public static final String COVER_IMAGE_SUFFIX = "_cover.png";

    public static final String APP_UPDATE_FOLDE = "/app/";

    public static final String APPLY_INFO_TEMPLATE = "我是%s";

    public static final String APP_EXE_SUFFIX = ".exe";

    /**
     * 至少8个字符，至少包含1个大写字母、1个小写字母和1个数字
     */
    public static final String PASSWORD_REGEX = "/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)[a-zA-Z\\d]{8,}$\n";

    public static final String APP_NAME = "EasyChatSetUp.";

    public static final String REDIS_KEY_USER_CONTACT = "easychat:ws:user:contact:";

    public static final Long MillionSeconds_3Days_AGO = 60 * 60 * 24 * 3 * 1000L;

    public static final String[] IMAGE_SUFFIX_LIST = {".jpg", ".jpeg", ".png", ".gif", ".bmp", ".webp", ".svg", ".ico"};

    public static final Long FILE_SIZE = 1024 * 1024L;
}
